import request from '@/utils/request'

// 查询一企一档列表
export function listInfo(query) {
  return request({
    url: '/enterpriseInfo/info/list',
    method: 'get',
    params: query
  })
}

// 智能筛选
export function intelligentFilterList(query) {
  return request({
    url: '/enterpriseInfo/info/intelligentFilter/list',
    method: 'get',
    params: query
  })
}

// 管理相对人查询
export function managerQueryList(query) {
  return request({
    url: '/enterpriseInfo/info/managerQuery/list',
    method: 'get',
    params: query
  })
}

// 监督检查记录查询
export function auditRecord(query) {
  return request({
    url: '/enterpriseInfo/info/auditRecord/list',
    method: 'get',
    params: query
  })
}

// 监督抽检记录查询
export function spotCheckRecord(query) {
  return request({
    url: '/enterpriseInfo/info/spotCheckRecord/list',
    method: 'get',
    params: query
  })
}

// 监督抽检记录查询
export function taskInfoEnterpriseInfoList(query) {
  return request({
    url: '/enterpriseInfo/info/taskInfo/list',
    method: 'get',
    params: query
  })
}

// 查询一企一档详细
export function getInfo(id) {
  return request({
    url: '/enterpriseInfo/info/getById/' + id,
    method: 'get'
  })
}

// 新增一企一档
export function addInfo(data) {
  return request({
    url: '/enterpriseInfo/info/saveEnterpriseInfo',
    method: 'post',
    data: data
  })
}

// 修改一企一档
export function updateInfo(data) {
  return request({
    url: '/enterpriseInfo/info/updateEnterpriseInfo',
    method: 'post',
    data: data
  })
}

// 删除一企一档
export function delInfo(id) {
  return request({
    url: '/enterpriseInfo/info/' + id,
    method: 'delete'
  })
}


// 市镇街道接口
export function getTreeCityCode(data) {
  return request({
    url: '/zp/citycode/getTreeCityCode',
    method: 'post',
    data: data
  })
}

// 无证单位
export function noSanitaryPermitStatus(query) {
  return request({
    url: '/enterpriseInfo/info/noSanitaryPermitStatus/page',
    method: 'get',
    params: query
  })
}

// 无档单位
export function noArchivesStatus(query) {
  return request({
    url: '/enterpriseInfo/info/noArchivesStatus/page',
    method: 'get',
    params: query
  })
}

// ---------------------------

// 放射卫生拓展信息列表
export function extendList(query) {
  return request({
    url: '/radiation/extend/list',
    method: 'get',
    params: query
  })
}
//放射卫生扩展信息导入模板下载
export function exportData(data) {
  return request({
    header:{
      responseType: 'blob',
    },
    url: '/radiation/extend/export',
    method: 'post',
    data: data
  })
}
// 放射卫生扩展信息导入数据
export function importData(data) {
  return request({
    url: '/radiation/extend/importData',
    method: 'post',
    data: data
  })
}

// 工商数据同步
export function dataSynchronization() {
  return request({
    url: '/radiation/extend/synchronization',
    method: 'get',
  })
}

// 查询许可设备数量列表
export function enterpriselicensenum(query) {
  return request({
    url: '/radiation/enterpriselicensenum/list',
    method: 'get',
    params: query
  })
}

// 放射卫生设备信息
export function enterprisedev(query) {
  return request({
    url: '/radiation/enterprisedev/list',
    method: 'get',
    params: query,
  })
}



// 查询放射卫生现状评定列表
export function enterpriseimport(query) {
  return request({
    url: '/radiation/enterpriseimport/list',
    method: 'get',
    params: query,
  })
}

// 查询放射卫生教育培训列表
export function enterpriseeducationtrain(query) {
  return request({
    url: '/radiation/enterpriseeducationtrain/list',
    method: 'get',
    params: query,
  })
}

// 修改放射卫生教育培训
export function enterpriseeducationtrainEdit(data) {
  return request({
    url: '/radiation/enterpriseeducationtrain/edit',
    method: 'post',
    data: data,
  })
}
